home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / sun4.md / RCS / vmparam.h,v < prev   
Encoding:
Text File  |  1990-12-08  |  4.5 KB  |  174 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     90.12.07.23.54.18;  author rab;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     90.11.12.18.07.52;  author rab;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @A lot of stuff in this file is wrong.  I #ifdef'ed it out.
  27. @
  28. text
  29. @/*    @@(#)vmparam.h 1.10 88/08/19 SMI    */
  30.  
  31. /*
  32.  * Copyright (c) 1987 by Sun Microsystems, Inc.
  33.  */
  34.  
  35. #ifndef _sun4_vmparam_h
  36. #define _sun4_vmparam_h
  37.  
  38.  
  39. /*
  40.  * None of this stuff is right for sprite.
  41.  */
  42. #ifndef sprite
  43.  
  44. #include <sun4/param.h>
  45.  
  46. /*
  47.  * Machine dependent constants for Sun-4
  48.  */
  49.  
  50. /*
  51.  * USRTEXT is the start of the user text/data space, while USRSTACK
  52.  * is the top (end) of the user stack.  LOWPAGES and HIGHPAGES are
  53.  * the number of pages from the beginning of the user address space
  54.  * to the beginning of the text and from the end of the stack to the
  55.  * end of the user address space respectively.
  56.  */
  57. #define    USRTEXT        0x2000
  58. #define    USRSTACK    KERNELBASE
  59. #define    LOWPAGES    btoc(USRTEXT)
  60. #define    HIGHPAGES    0
  61.  
  62. /*
  63.  * Virtual memory related constants for UNIX resource control, all in bytes
  64.  * The default stack size of 8M allows an optimization of mmu mapping 
  65.  * resources so that in normal use a single mmu region map entry (smeg)
  66.  * can be used to map both the stack and shared libraries
  67.  */
  68. #define    DFLSSIZ        (8*1024*1024)        /* initial stack size limit */
  69.  
  70. #define    DFLDSIZ_260    ((512*1024*1024)-USRTEXT) /* initial data size limit */
  71. #define    MAXDSIZ_260    ((512*1024*1024)-USRTEXT) /* max data size limit */
  72. #define    MAXSSIZ_260    ((512*1024*1024)-KERNELSIZE)/* max stack size limit */
  73.  
  74. #define    DFLDSIZ_460    ((2048*1024*1024)-USRTEXT) /* initial data size limit */
  75. #define    MAXDSIZ_460    ((2048*1024*1024)-USRTEXT) /* max data size limit */
  76. #define    MAXSSIZ_460    ((2048*1024*1024)-KERNELSIZE)/* max stack size limit */
  77.  
  78. #define DFLDSIZ        dfldsiz
  79. #define MAXDSIZ        maxdsiz
  80. #define MAXSSIZ        maxssiz
  81.  
  82. #ifndef LOCORE
  83. extern unsigned int    dfldsiz;
  84. extern unsigned int     maxdsiz;
  85. extern unsigned int    maxssiz;
  86. #endif !LOCORE
  87.  
  88. #define    SSIZE        1            /* initial stack size */
  89. #define    SINCR        1            /* increment of stack */
  90.  
  91. /*
  92.  * Size of the kernel segkmem system pte table.  This virtual
  93.  * space is controlled by the resource map "kernelmap".
  94.  */
  95. #define    SYSPTSIZE    (0x640000 / MMU_PAGESIZE)
  96.  
  97. /*
  98.  * Minimum allowable virtual address space to be used
  99.  * by the seg_map segment driver for fast kernel mappings.
  100.  */
  101. #define    MINMAPSIZE    0x200000
  102.  
  103. /*
  104.  * The time for a process to be blocked before being very swappable.
  105.  * This is a number of seconds which the system takes as being a non-trivial
  106.  * amount of real time. You probably shouldn't change this;
  107.  * it is used in subtle ways (fractions and multiples of it are, that is, like
  108.  * half of a ``long time'', almost a long time, etc.)
  109.  * It is related to human patience and other factors which don't really
  110.  * change over time.
  111.  */
  112. #define    MAXSLP         20
  113.  
  114. /*
  115.  * A swapped in process is given a small amount of core without being bothered
  116.  * by the page replacement algorithm. Basically this says that if you are
  117.  * swapped in you deserve some resources. We protect the last SAFERSS
  118.  * pages against paging and will just swap you out rather than paging you.
  119.  * Note that each process has at least UPAGES pages which are not
  120.  * paged anyways so this number just means a swapped in process is
  121.  * given around 32k bytes.
  122.  */
  123. #define    SAFERSS        3        /* nominal ``small'' resident set size
  124.                        protected against replacement */
  125.  
  126. /*
  127.  * DISKRPM is used to estimate the number of paging i/o operations
  128.  * which one can expect from a single disk controller.
  129.  */
  130. #define    DISKRPM        60
  131.  
  132. /*
  133.  * Paging thresholds (see vm_pageout.c).
  134.  * Strategy of 3/17/83:
  135.  *    lotsfree is 256k bytes, but at most 1/8 of memory
  136.  *    desfree is 100k bytes, but at most 1/16 of memory
  137.  *    minfree is 32k bytes, but at most 1/2 of desfree
  138.  */
  139. #define    LOTSFREE    (256 * 1024)
  140. #define    LOTSFREEFRACT    8
  141. #define    DESFREE        (100 * 1024)
  142. #define    DESFREEFRACT    16
  143. #define    MINFREE        (32 * 1024)
  144. #define    MINFREEFRACT    2
  145.  
  146. /*
  147.  * There are two clock hands, initially separated by HANDSPREAD bytes
  148.  * (but at most all of user memory).  The amount of time to reclaim
  149.  * a page once the pageout process examines it increases with this
  150.  * distance and decreases as the scan rate rises.
  151.  */
  152. #define    HANDSPREAD    (2 * 1024 * 1024)
  153.  
  154. /*
  155.  * Paged text files that are less than PGTHRESH bytes
  156.  * may be "prefaulted in" instead of demand paged.
  157.  */
  158. #define PGTHRESH    (280 * 1024)
  159. #endif
  160. #endif /*!_sun4_vmparam_h*/
  161. @
  162.  
  163.  
  164. 1.1
  165. log
  166. @Initial revision
  167. @
  168. text
  169. @d10 6
  170. d131 1
  171. a131 1
  172.  
  173. @
  174.